Optimal. Leaf size=34 \[ -\frac {a^2 \cot (e+f x)}{f}-\frac {2 a b \tanh ^{-1}(\cos (e+f x))}{f}+b^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2789, 3770, 3012, 8} \[ -\frac {a^2 \cot (e+f x)}{f}-\frac {2 a b \tanh ^{-1}(\cos (e+f x))}{f}+b^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2789
Rule 3012
Rule 3770
Rubi steps
\begin {align*} \int \csc ^2(e+f x) (a+b \sin (e+f x))^2 \, dx &=(2 a b) \int \csc (e+f x) \, dx+\int \csc ^2(e+f x) \left (a^2+b^2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac {2 a b \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 \cot (e+f x)}{f}+b^2 \int 1 \, dx\\ &=b^2 x-\frac {2 a b \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 \cot (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.24, size = 76, normalized size = 2.24 \[ \frac {a^2 \tan \left (\frac {1}{2} (e+f x)\right )+a^2 \left (-\cot \left (\frac {1}{2} (e+f x)\right )\right )+2 b \left (2 a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-2 a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+b e+b f x\right )}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.52, size = 77, normalized size = 2.26 \[ \frac {b^{2} f x \sin \left (f x + e\right ) - a b \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) + a b \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - a^{2} \cos \left (f x + e\right )}{f \sin \left (f x + e\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 52, normalized size = 1.53 \[ b^{2} x -\frac {a^{2} \cot \left (f x +e \right )}{f}+\frac {2 a b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{f}+\frac {b^{2} e}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.63, size = 52, normalized size = 1.53 \[ \frac {{\left (f x + e\right )} b^{2} - a b {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {a^{2}}{\tan \left (f x + e\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.83, size = 105, normalized size = 3.09 \[ \frac {2\,b^2\,\mathrm {atan}\left (\frac {b\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+2\,a\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,a\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )-b\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f}-\frac {a^2\,\mathrm {cot}\left (e+f\,x\right )}{f}+\frac {2\,a\,b\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \csc ^{2}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________